<template>
	<view class="content">
		<view class="logo">
			<p>logo</p>
		</view>
		<view>
			<button class="wxbtn btn" @click="getUserInfo">微信登录</button>
			<navigator url="../login/login" hover-class="none">
				<button class="btn">手机号登录/注册</button>
			</navigator>
			<label class="usercheck">
				<checkbox value="cb" class="checks" />登录代表您已同意平台<text class="userwarn">服务协议、隐私政策</text>
			</label>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			getUserInfo(e) {
				 uni.login({
				                     provider: 'weixin',
				                     success: (res) => {
				                         console.log(res)
				                         this.wxcode = res.code
				                     }
				                 })
				// uni.login({
				//   provider: 'weixin',
				//   success: function (loginRes) {
				//     console.log(loginRes.authResult);
				//     // 获取用户信息
				//     uni.getUserInfo({
				//       provider: 'weixin',
				//       success: function (infoRes) {
				//         console.log('用户昵称为：' + infoRes.userInfo.nickName);
				//       }
				//     });
				//   }
				// });
			}
		}
	}
</script>

<style scoped>
	.logo {
		height: 30vh;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.btn {
		width: 90%;
		margin-top: 10px;
		font-size: 13px;
	}

	.wxbtn {
		background-color: #FFDD00;
	}

	.usercheck {
		margin-top: 15px;
		font-size: 12px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.checks {
		transform: scale(0.6)
	}
</style>